home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / Hot Demos! / DroidWorks demo / dwCD.gob / mission_cog_t9_objectives.cog < prev    next >
Text File  |  1998-09-17  |  4KB  |  152 lines

  1. # Droids Cog Script
  2. #
  3. # Objectives cog FOR GEARSs
  4. #  
  5. # Desc:
  6. #
  7. # GOAL 0 1 Reach top of cliff
  8. # GOAL 0 2 End affector with grabbing ability
  9. #
  10. # GOAL 1 1 Reach top of cliff
  11. # GOAL 1 2 End affector with grabbing ability 
  12. # GOAL 1 3 Droid with tractor treads 
  13. #
  14. # GOAL 2 1 Reach top of cliff
  15. # GOAL 2 2 End affector with grabbing ability 
  16. # GOAL 2 3 Droid with legs 
  17. # GOAL 2 4 Under 5 minutes
  18. # GOAL 2 5 50% Battery power left 
  19. #
  20. #
  21. #
  22. # 01/22/98 [DGS]    Created
  23. #
  24. #
  25. # (C) 1997 LucasLearningLimited. All Rights Reserved
  26.  
  27.  
  28.  
  29. symbols                     
  30. message                        startup
  31. message                        shutdown
  32. message                        timer
  33. message                        entered
  34.  
  35. sector                         endsector
  36.  
  37. int        undertimelimit        local
  38. int        finished            local
  39. int        player                local
  40. int        halfpower            local
  41.  
  42. end
  43. ## Code Section
  44. code    
  45.  
  46. startup:
  47.     
  48.         //GOAL 0 1 pass through security exit door
  49.         //REQUIREMENT 0 2 grabbing & tugging ability
  50.         //REQUIREMENT 0 3 arm strength: 130 kg or greater
  51.         //REQUIREMENT 0 4 Vocabulator
  52.         
  53.         //GOAL 1 1 pass through security exit door
  54.         //REQUIREMENT 1 2 grabbing & tugging ability
  55.         //REQUIREMENT 1 4 arm strength: 130 kg or greater 
  56.         //REQUIREMENT 1 3 treads or wheels 
  57.         //REQUIREMENT 1 5 Vocabulator
  58.         
  59.         //GOAL 2 4 complete in under 3 minutes
  60.         //GOAL 2 1 pass through scurity exit door
  61.         //REQUIREMENT 2 5 adapter manipulator
  62.         //REQUIREMENT 2 2 grabbing & tugging ability
  63.         //REQUIREMENT 2 6 arm strength: 130 kg or greater 
  64.         //REQUIREMENT 2 3 legs  
  65.         //REQUIREMENT 2 7 Vocabulator
  66.     
  67.     player        =    getlocalplayerthing();
  68.     finished     =     0;// Set this variable to false until the level is finished
  69.          
  70.     if (getdifficulty() == 0)// +++++++++++++++++ EASY 
  71.         {
  72.         //REQUIREMENT 0 2 grabbing & tugging ability
  73.         if (dwCheckDroidCaps(2048))    SetInv(player, 2, 1);// if droid has grab set the flag to true
  74.         //REQUIREMENT 0 3 arm strength: 130 kg or greater
  75.         if (dwGetArmStrength() > 8)    SetInv(player, 3, 1);// 
  76.         //REQUIREMENT 0 4 Vocabulator
  77.          if (dwCheckDroidCaps(1048576)) SetInv(player, 4, 1);// if droid can talk        
  78.         
  79.         }
  80.     if (getdifficulty() == 1)// +++++++++++++++++ MEDIUM 
  81.         {
  82.         //REQUIREMENT 1 2 grabbing & tugging ability
  83.             if (dwCheckDroidCaps(2048)) SetInv(player, 2, 1);// if droid has grab set the flag to true
  84.         //REQUIREMENT 1 3 treads or wheels 
  85.             if (dwCheckDroidCaps(524288)) SetInv(player, 3, 1);// if droid has treads  set the flag to true
  86.         //REQUIREMENT 1 4 arm strength: 130 kg or greater 
  87.             if (dwGetArmStrength() > 8)    SetInv(player, 4, 1);// 
  88.         //REQUIREMENT 1 5 Vocabulator
  89.             if (dwCheckDroidCaps(1048576)) SetInv(player, 5, 1);// if droid can talk        
  90.         }
  91.         
  92.     if (getdifficulty() == 2)// +++++++++++++++++++HARD 
  93.         {
  94.         
  95.         //REQUIREMENT 2 5 adapter manipulator
  96.             //if (dwCheckDroidCaps(16384)) SetInv(player, 5, 1);
  97.             if (dwCheckDroidCaps(65536)) SetInv(player, 5, 1);
  98.         //REQUIREMENT 2 2 grabbing & tugging ability
  99.             if (dwCheckDroidCaps(2048)) SetInv(player, 2, 1);// if droid has grab set the flag to true
  100.         //REQUIREMENT 2 6 arm strength: 130 kg or greater 
  101.             if (dwGetArmStrength() > 8)    SetInv(player, 6, 1);// 
  102.         //REQUIREMENT 2 3 legs  
  103.             if (dwCheckDroidCaps(8)) SetInv(player, 3, 1);// if droid has legs set the flag to true
  104.         //REQUIREMENT 2 7 Vocabulator
  105.             if (dwCheckDroidCaps(1048576)) SetInv(player, 7, 1);// if droid can talk        
  106.         
  107.         //GOAL 2 4 complete in under 3 minutes
  108.             SetTimer(6*60);  //set the 3 minute timer on Hard
  109.             undertimelimit = 1;// Set this to true until time runs out 
  110.         }                                                                                     
  111.      return;
  112. shutdown:
  113.     if (getdifficulty() == 0) //++++++++++++++++++ EASY
  114.         {
  115.         // GOAL 0 1 Reach top of cliff
  116.          if (finished == 1) SetInv(player, 1, 1);          
  117.         }
  118.     
  119.     if (getdifficulty() == 1) //++++++++++++++++++ MEDIUM
  120.         {
  121.         // GOAL 1 1 Reach top of cliff
  122.         if (finished == 1) SetInv(player, 1, 1);          
  123.         }
  124.         
  125.     if (getdifficulty() == 2) //++++++++++++++++++ HARD
  126.         {
  127.         // GOAL 2 1 Reach top of cliff
  128.         if (finished == 1) SetInv(player, 1, 1);          
  129.         // GOAL 2 4 Under 5 minutes
  130.         } 
  131.     return;
  132.  
  133. timer:
  134.      undertimelimit = 0;
  135.      return;
  136.      
  137. entered:
  138.     if (getdifficulty() == 2) //++++++++++++++++++ HARD
  139.         {
  140.         if (undertimelimit == 1) SetInv(player, 4, 1);          
  141.         }
  142.     finished = 1;
  143.     return;         
  144.  
  145.   
  146. end
  147.  
  148.  
  149.  
  150.  
  151.